package com.brush.app.domain.req.Suggestion.query;

import cn.hutool.core.util.StrUtil;
import com.brush.common.core.domain.page.PageAbstructReq;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.util.Date;
@Setter
@Getter
@ApiModel(value = "AppSuggestionQueryReq",description = "建议反馈查询参数")
@ToString(callSuper = true)
public class AppSuggestionQueryReq extends PageAbstructReq {
    /**
     *主键id
     */
    @ApiModelProperty(value = "id")
    private Integer id;

    /**
     * 所属项目id
     */
    @ApiModelProperty(value = "所属项目id")
    private Long projectId;


    /**
     * 0未解决，1解决中，2已解决
     */
    @ApiModelProperty(value = "0未解决，1解决中，2已解决")
    private String status;

    /**
     * 创建人
     */
    @ApiModelProperty(value = "创建人")
    private String createUser;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    private Date createTime;
    @Override
    public String getOrderBy() {

        if (StrUtil.isNotBlank(super.getOrderByColumn())){
            return super.getOrderByColumn() + " " + super.getIsAsc();
        }
        return null;
    }
}
